const Layout = () => import('@/layout/index')
const Home = () => import('@/views/home/index')
const FormBoard = () => import('@/views//formBoard/index')
const CreateAct = () => import('@/views//formBoard/components/createAct')
const Act = () => import('@/views//formBoard/components/act')
const Manage = () => import('@/views/manage/index')
const Setup = () => import('@/views/manage/acts/setup')
const List = () => import('@/views/manage/acts/list')
const Comment = () => import('@/views/manage/acts/comment')
const Statistical = () => import('@/views/manage/acts/statistical')
const RankList = () => import('@/views/manage/acts/rankList')
// const Special = () => import('@/views/special/index')
// const Lottery = () => import('@/views/lottery/index')
// const Operation = () => import('@/views/operation/index')
const NotFound = () => import('@/components/404')
const Login = () => import('@/views/login')


export const constantRouterMap = [

  {
    path: '/',
    component: Layout,
    redirect: '/home',
    children: [
      {
        name: 'home',
        component: Home,
        path: '/home',
        meta: {
          title: '首页',
          icon: 'iconshouye',
          isMenu: true
        }
      },
      {
        name: 'formBoard',
        component: FormBoard,
        path: '/formBoard',
        meta: {
          title: '活动模板',
          icon: 'iconliwu',
          isMenu: true
        },
        redirect: '/formBoard/act',
        children: [{
          name: 'createAct',
          component: CreateAct,
          path: 'createAct',
          meta: {
            title: '活动模板',
            icon: '',
            isMenu: false
          }
        }, {
          name: 'act',
          component: Act,
          path: 'act',
          meta: {
            title: '活动模板',
            icon: '',
            isMenu: false
          }
        }]
      },
      {
        name: 'manage',
        component: Manage,
        path: '/manage',
        meta: {
          title: '管理活动',
          icon: 'icon32caidan--',
          isMenu: true
        },
        redirect: '/manage/list',
        children: [{
            name: 'list',
            component: List,
            path: 'list',
            meta: {
              title: '管理活动',
              icon: '',
              isMenu: false
            }
          }, {
            name: 'setup',
            component: Setup,
            path: 'setup',
            meta: {
              title: '管理活动',
              icon: '',
              isMenu: false
            }
          },
          {
            name: 'comment',
            component: Comment,
            path: 'comment',
            meta: {
              title: '评论管理',
              icon: '',
              isMenu: false
            }
          },
          {
            name: 'statistical',
            component: Statistical,
            path: 'statistical',
            meta: {
              title: '投票统计',
              icon: '',
              isMenu: false
            }
          },
          {
            name: 'rankList',
            component: RankList,
            path: 'rankList',
            meta: {
              title: '票数排行',
              icon: '',
              isMenu: false
            }
          }
        ]
      },


      // {
      //   name: 'special',
      //   component: Special,
      //   path: '/special',
      //   meta: {
      //     title: '专题活动',
      //     icon: 'iconzhuanti',
      //     isMenu: true
      //   }
      // },
      // {
      //   name: 'lottery',
      //   component: Lottery,
      //   path: '/lottery',
      //   meta: {
      //     title: '抽奖中心',
      //     icon: 'iconchoujiang',
      //     isMenu: true
      //   }
      // },
      // {
      //   name: 'operation',
      //   component: Operation,
      //   path: '/operation',
      //   meta: {
      //     title: '操作教程',
      //     icon: 'iconwenhao',
      //     isMenu: true
      //   }
      // }
    ]
  },
  {
    path:'/login',
    component:Login,
    meta:{
      title:'登录'
    }
  },
  {
    path: "*",
    name: "notFound",
    component: NotFound,
    meta: {
      title: "404",
    }
  }
]